package com.credithc.customers.base.ro;

import com.credithc.customers.base.codes.CustomerCodes;
import com.credithc.customers.base.exception.CustomerException;
import com.credithc.customers.base.utils.CustomerUtils;
import lombok.Data;
import org.apache.commons.lang.StringUtils;

/**
 * @description: 客户注册入参表
 * @author: fby
 * @date: 2020/01/14 14:16
 * @param: null
 * @return:
 */
@Data
public class CustomerUnifyVerifyRo extends CustomerBaseRo {

    private String phone;


    public static void checkBaseParam(CustomerUnifyVerifyRo ro) {
        CustomerUtils.checkPhone(ro.getPhone());
        if (StringUtils.isBlank(ro.getRequestNo())) {
            throw new CustomerException(CustomerCodes.PARAM_VALIDATE_ERROR, "流水号不能为空");
        }
        /*if (StringUtils.isBlank(ro.getSubSystemSign())) {
            throw new CustomerException(CustomerCodes.PARAM_VALIDATE_ERROR, "子系统标识不能为空");
        }
        if (StringUtils.isBlank(ro.getSystemSign())) {
            throw new CustomerException(CustomerCodes.PARAM_VALIDATE_ERROR, "系统标识不能为空");
        }*/
    }
}
